#include "Detail.h"
#include "Common/Common.h"
#include "Core/Core.h"

Detail::Detail( std::string id ) :
	Part( id ),
	_body( 0 )
{
}

Detail::~Detail( )
{
}

void Detail::SetBody( physics::IBody* body )
{
	_body = body;
}

physics::IBody* Detail::GetBody( ) const
{
	return _body;
}

void Detail::SetTextureInfo(const TextureInfo* texInfo)
{
	_texInfo = texInfo;
}


const TextureInfo* Detail::GetTextureInfo() const
{
	return _texInfo;
}

void Detail::PerformAction( const Action& )
{
}

void Detail::Update( float )
{

}

void Detail::Draw( ) const
{
	Transform bodyPos = _body->GetPos();
	Transform texPos =bodyPos * _texInfo->GetPosition();

	core::Renderer::DrawTexture(
		_texInfo->GetImage(),
		texPos,
		_texInfo->GetWidth(),
		_texInfo->GetHeight());
}
